home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / InstallMaster 7.03 / Devfulldemo.exe / file0214.bin < prev    next >
Encoding:
Text File  |  1999-04-26  |  7.1 KB  |  279 lines

  1. Document Type: WSE
  2. item: Global
  3.   Version=6.0
  4.   Flags=00000100
  5.   Split=1420
  6.   Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  7.   Copy Default=1
  8.   Japanese Font Name=MS Gothic
  9.   Japanese Font Size=10
  10.   Start Gradient=0 0 255
  11.   End Gradient=0 0 0
  12.   Windows Flags=00000100000000000010110000001000
  13.   Message Font=MS Sans Serif
  14.   Font Size=8
  15.   Disk Filename=setup
  16.   Patch Flags=0000000000000001
  17.   Patch Threshold=85
  18.   Patch Memory=4000
  19.   FTP Cluster Size=20
  20. end
  21. item: Remark
  22.   Text=This sample script for Wise 6.0 demonstrates how to use the Dialog Event Handler.
  23. end
  24. item: Remark
  25.   Text=To see the other 90% of this script, open the dialog. Then click View, Script Editor.
  26. end
  27. item: Remark
  28.   Text=The variable DLG_EVENT_TYPE refers to the current event that is occuring in a dialog.
  29. end
  30. item: Remark
  31.   Text=The variable will pass either a pre- or user-defined code. See your documentation for the pre-defined codes.
  32. end
  33. item: Remark
  34. end
  35. item: Custom Dialog Set
  36.   Name=Event Handler
  37.   item: Dialog
  38.     Title=Event Handler
  39.     Width=170
  40.     Height=170
  41.     Font Name=Helv
  42.     Font Size=8
  43.     item: Push Button
  44.       Control Name=ShowExit
  45.       Rectangle=3 89 48 104
  46.       Alternate=ShowExit
  47.       Action=7
  48.       Enabled Color=00000000000000001111111111111111
  49.       Create Flags=01010000000000010000000000000000
  50.       Text=&Show Exit
  51.     end
  52.     item: Push Button
  53.       Control Name=HideExit
  54.       Rectangle=58 89 103 104
  55.       Alternate=HideExit
  56.       Action=7
  57.       Enabled Color=00000000000000001111111111111111
  58.       Create Flags=01010000000000010000000000000001
  59.       Text=&Hide Exit
  60.     end
  61.     item: Push Button
  62.       Control Name=Exit
  63.       Rectangle=58 119 103 134
  64.       Action=1
  65.       Enabled Color=00000000000000001111111111111111
  66.       Create Flags=01010000000000010000000000000000
  67.       Text=E&xit
  68.     end
  69.     item: Static
  70.       Control Name=ExitMessage
  71.       Rectangle=20 32 144 49
  72.       Enabled Color=00000000000000001111111111111111
  73.       Create Flags=01010000000000000000000000000001
  74.       Text=%EXITMESSAGE%
  75.     end
  76.     item: Push Button
  77.       Control Name=DisableEnableExit
  78.       Rectangle=114 89 159 104
  79.       Alternate=DisableEnableExit
  80.       Action=7
  81.       Enabled Color=00000000000000001111111111111111
  82.       Create Flags=01010000000000010000000000000000
  83.       Text=Enable Exit
  84.     end
  85.     item: Remark
  86.       Text=This is the Event Handler, where most of the workings of this script are.
  87.     end
  88.     item: Remark
  89.       Text=In order to define a sub-routine, you must name it in the control that it is linked to.
  90.     end
  91.     item: Remark
  92.       Text=This is done in the Execute Named Event action inside the push button.
  93.     end
  94.     item: Remark
  95.     end
  96.     item: Remark
  97.       Text=The variable Disabledflag is set depending upon the state of the exit button.
  98.     end
  99.     item: Remark
  100.       Text=The variable Exitmessage is set to the current message to display.
  101.     end
  102.     item: Remark
  103.     end
  104.     item: Remark
  105.       Text=The value of "INIT" in the DLG_EVENT_TYPE variable is defined by Wise, meaning that the dialog is loading up,
  106.     end
  107.     item: Remark
  108.       Text=    and the controls on it have not been shown yet. In this case, the following block runs the HideExit sub
  109.     end
  110.     item: Remark
  111.       Text=    when it is loaded. It has the effect of setting the Dialog defaults.
  112.     end
  113.     item: If/While Statement
  114.       Variable=DLG_EVENT_TYPE
  115.       Value=INIT
  116.     end
  117.     item: Set Variable
  118.       Variable=DLG_EVENT_TYPE
  119.       Value=HideExit
  120.     end
  121.     item: Set Variable
  122.       Variable=DISABLEDFLAG
  123.       Value=Yes
  124.     end
  125.     item: Set Variable
  126.       Variable=EXITMESSAGE
  127.       Value=The exit button is hidden.
  128.     end
  129.     item: End Block
  130.     end
  131.     item: Remark
  132.     end
  133.     item: Remark
  134.       Text=This sub is run when the Show Exit button is clicked.
  135.     end
  136.     item: Remark
  137.       Text=Its main function is to display the exit button.
  138.     end
  139.     item: If/While Statement
  140.       Variable=DLG_EVENT_TYPE
  141.       Value=ShowExit
  142.     end
  143.     item: Set Control Attribute
  144.       Control Name=ShowExit
  145.       Operation=1
  146.     end
  147.     item: Set Control Attribute
  148.       Control Name=HideExit
  149.     end
  150.     item: Set Control Attribute
  151.       Control Name=DisableEnableExit
  152.     end
  153.     item: Remark
  154.     end
  155.     item: Remark
  156.       Text=This nested If Statement checks to see if the last state of the exit button was disabled or not.
  157.     end
  158.     item: If/While Statement
  159.       Variable=DISABLEDFLAG
  160.       Value=Yes
  161.     end
  162.     item: Set Variable
  163.       Variable=EXITMESSAGE
  164.       Value=The exit button is visible, but disabled.
  165.     end
  166.     item: Set Control Attribute
  167.       Control Name=Exit
  168.     end
  169.     item: Set Control Attribute
  170.       Control Name=Exit
  171.       Operation=1
  172.     end
  173.     item: Else Statement
  174.     end
  175.     item: Set Variable
  176.       Variable=EXITMESSAGE
  177.       Value=The exit button is visible and enabled.
  178.     end
  179.     item: Set Control Attribute
  180.       Control Name=Exit
  181.     end
  182.     item: End Block
  183.     end
  184.     item: Remark
  185.     end
  186.     item: End Block
  187.     end
  188.     item: Remark
  189.     end
  190.     item: Remark
  191.       Text=This sub is run when the Hide Exit button is clicked.
  192.     end
  193.     item: Remark
  194.       Text=Its main function is to hide the exit button.
  195.     end
  196.     item: If/While Statement
  197.       Variable=DLG_EVENT_TYPE
  198.       Value=HideExit
  199.     end
  200.     item: Set Variable
  201.       Variable=EXITMESSAGE
  202.       Value=The exit button is hidden.
  203.     end
  204.     item: Set Control Attribute
  205.       Control Name=HideExit
  206.       Operation=1
  207.     end
  208.     item: Set Control Attribute
  209.       Control Name=ShowExit
  210.     end
  211.     item: Set Control Attribute
  212.       Control Name=Exit
  213.       Operation=2
  214.     end
  215.     item: Set Control Attribute
  216.       Control Name=DisableEnableExit
  217.       Operation=1
  218.     end
  219.     item: End Block
  220.     end
  221.     item: Remark
  222.     end
  223.     item: Remark
  224.       Text=This sub is run when the Enable/Disable Exit button is clicked.
  225.     end
  226.     item: Remark
  227.       Text=Its main function is to change the state of the Exit button
  228.     end
  229.     item: Remark
  230.       Text=    and to change the text of the button Enable/Disable button itself.
  231.     end
  232.     item: If/While Statement
  233.       Variable=DLG_EVENT_TYPE
  234.       Value=DisableEnableExit
  235.     end
  236.     item: If/While Statement
  237.       Variable=DISABLEDFLAG
  238.       Value=Yes
  239.     end
  240.     item: Set Variable
  241.       Variable=DISABLEDFLAG
  242.       Value=No
  243.     end
  244.     item: Set Control Attribute
  245.       Control Name=Exit
  246.     end
  247.     item: Set Variable
  248.       Variable=EXITMESSAGE
  249.       Value=The exit button is visible and enabled.
  250.     end
  251.     item: Set Control Text
  252.       Control Name=DisableEnableExit
  253.       Control Text=Disable Exit
  254.     end
  255.     item: Else Statement
  256.     end
  257.     item: Set Variable
  258.       Variable=DISABLEDFLAG
  259.       Value=Yes
  260.     end
  261.     item: Set Control Attribute
  262.       Control Name=Exit
  263.       Operation=1
  264.     end
  265.     item: Set Variable
  266.       Variable=EXITMESSAGE
  267.       Value=The exit button is visible, but disabled.
  268.     end
  269.     item: Set Control Text
  270.       Control Name=DisableEnableExit
  271.       Control Text=Enable Exit
  272.     end
  273.     item: End Block
  274.     end
  275.     item: End Block
  276.     end
  277.   end
  278. end
  279.